import { uiStyleProperties } from './common'

// input
export const inputNumberProperties = [
    ...uiStyleProperties.filter(e => ['ui.style.width'].indexOf(e.model) !== -1),
    {
        model: 'ui.min',
        widget: 'inputNumber',
        label: '最小值',
        ui: {
            placeholder: '请输入最小值',
            controlsPosition: 'right',
            style: {
                width: '100%'
            }
        }
    },
    {
        model: 'ui.max',
        widget: 'inputNumber',
        label: '最大值',
        ui: {
            placeholder: '请输入最大值',
            controlsPosition: 'right',
            style: {
                width: '100%'
            }
        }
    },
    {
        model: 'ui.step',
        widget: 'inputNumber',
        label: '步长',
        ui: {
            placeholder: '请输入步长',
            controlsPosition: 'right',
            style: {
                width: '100%'
            }
        }
    },
    {
        model: 'ui.stepStrictly',
        widget: 'switch',
        label: '步长倍数'
    },
    {
        model: 'ui.precision',
        widget: 'inputNumber',
        label: '精度',
        ui: {
            placeholder: '请输入精度',
            min: 0,
            max: 20,
            precision: 0,
            controlsPosition: 'right',
            style: {
                width: '100%'
            }
        }
    },
    {
        model: 'ui.controls',
        widget: 'switch',
        label: '展示控件'
    },
    {
        model: 'ui.controlsPosition',
        widget: 'select',
        label: '控件位置',
        enum: [
            { label: '右侧', value: 'right' }
        ],
        ui: {
            placeholder: '请选择控件位置',
            clearable: true,
            style: {
                width: '100%'
            }
        }
    }
]
